home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
class
/
objary.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-16
|
3KB
|
144 lines
/* Copyright (c) 1993-1996 Algorithms Corporation */
/* All rights reserved. */
/* This file automatically generated by dpp - do not edit */
#define DPP_STRATEGY 2
#define DPP_FASTWIDE 0
#line 18 "objary.d"
#include "array1.h"
#define CLASS ObjectArray_c
#define ivType ObjectArray_iv_t
#include "generics.h"
object ObjectArray_c;
#line 27 "objary.d"
#define TYPE object
static gIndex_t _index;
cvmeth objrtn ObjectArray_cvm_vNew(object self, va_list _rest_)
{
unsigned rank = va_arg(_rest_, unsigned);
#line 35 "objary.d"
static gNewArray_t cnew = NULL;
MAKE_REST(rank);
if (!cnew)
cnew = cmcPointer(Array, gNewArray);
return cnew(self, AT_OBJ, rank, _rest_);
}
#line 48 "objary.c"
static objrtn ObjectArray_cfm_vNew(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ObjectArray_cvm_vNew(self, _rest_);
}
#line 43 "objary.d"
ivmeth objrtn ObjectArray_ivm_vValue(object self, va_list _rest_)
{
MAKE_REST(self);
return *((TYPE *) _index(self, _rest_));
}
#line 66 "objary.c"
static objrtn ObjectArray_ifm_vValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ObjectArray_ivm_vValue(self, _rest_);
}
#line 49 "objary.d"
ivmeth objrtn ObjectArray_ivm_vChangeValue(object self, va_list _rest_)
{ object val = va_arg(_rest_, object);
MAKE_REST(val);
ChkArgNul(val, 2);
*((TYPE *) _index(self, _rest_)) = val;
return self;
}
#line 86 "objary.c"
static objrtn ObjectArray_ifm_vChangeValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ObjectArray_ivm_vChangeValue(self, _rest_);
}
#line 57 "objary.d"
static void init_class(void)
{
_index = imcPointer(Array, gIndex);
}
#line 102 "objary.c"
objrtn ObjectArray_initialize(void)
{
static CRITICALSECTION cs;
static int volatile once = 0;
ENTERCRITICALSECTION(_CI_CS_);
if (!once) {
INITIALIZECRITICALSECTION(cs);
once = 1;
}
LEAVECRITICALSECTION(_CI_CS_);
ENTERCRITICALSECTION(cs);
if (ObjectArray_c) {
LEAVECRITICALSECTION(cs);
return ObjectArray_c;
}
INHIBIT_THREADER;
Array_initialize();
if (ObjectArray_c) {
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return ObjectArray_c;
}
ObjectArray_c = gNewClass(Class, "ObjectArray", 0, 0, Array, END);
cvMethodFor(ObjectArray, vNew, ObjectArray_cvm_vNew, ObjectArray_cfm_vNew);
ivMethodFor(ObjectArray, vValue, ObjectArray_ivm_vValue, ObjectArray_ifm_vValue);
ivMethodFor(ObjectArray, vChangeValue, ObjectArray_ivm_vChangeValue, ObjectArray_ifm_vChangeValue);
init_class();
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return ObjectArray_c;
}